<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $this->title;?></title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/load.js"></script>
<!--时间选择器-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/lang/cn_utf8.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-setup.js"></script>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-blue.css" />
<!--colorbox-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jquery.colorbox.js"></script>
<link href="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/colorbox2.css" rel="stylesheet" type="text/css"/>

</head>

<body style="overflow:auto;">
	<div id="main">
		<div id="topMenu">
			<div id="navigation">当前位置：订单列表(测试数据)</div>
			<div id="topOtherMenu"></div>
		</div>
		<div id="body">
			<div id="search">
				<form id="searchForm" name="searchForm" method="post" action="<?php echo $this->projectUrl();?>">
					<table border="0" align="left" cellpadding="0" cellspacing="0" >
						
						<tr>
							<td width="60">订单编号：</td>
							<td><input name="orderId" type="text" class="input" id="orderId" size="15" value="<?php echo htmlspecialchars($this->vars['orderId']);?>" /></td>
							<td width="60">所在省份：</td>
							<td><input name="province" type="text" class="input" id="province" size="15" value="<?php echo htmlspecialchars($this->vars['province']);?>" /></td>
							<td width="75">所在城市：</td>
							<td><input name="city" type="text" class="input" id="city" size="15" value="<?php echo htmlspecialchars($this->vars['city']);?>" /></td>
							<td width="75">所在区县：</td>
							<td><input name="county" type="text" class="input" id="county" size="15" value="<?php echo htmlspecialchars($this->vars['county']);?>" /></td>
						</tr>
						<tr>
							<td width="60">机器号：</td>
							<td><input name="udid" type="text" class="input" id="udid" size="15" value="<?php echo htmlspecialchars($this->vars['udid']);?>" /></td>
							<td width="60">操作系统： </td>
							<td><input name="osName" type="text" class="input" id="osName" size="15" value="<?php echo htmlspecialchars($this->vars['osName']);?>" /></td>
							<td width="75">推广ID： </td>
							<td><input name="sourceId" type="text" class="input" id="sourceId" size="15" value="<?php echo htmlspecialchars($this->vars['sourceId']);?>" /></td>
							<td width="75">推广子ID：</td>
							<td><input name="sourceSubId" type="text" class="input" id="sourceSubId" size="15" value="<?php echo htmlspecialchars($this->vars['sourceSubId']);?>" />							</td>
						</tr>
						<tr>
							<td width="60">IP地址：</td>
							<td><input name="ip" type="text" class="input" id="ip" size="15" value="<?php echo htmlspecialchars($this->vars['ip']);?>" /></td>
							<td width="60">提交时间：</td>
							<td colspan="5"><input name="startTime" type="text" class="input" id="startTime" size="18" value="<?php echo $this->vars['startTime'];?>" />
								<script type="text/javascript">Calendar.setup({"ifFormat":"%Y-%m-%d %H:%M:00","firstDay":0,"showsTime":true,"showOthers":false,"timeFormat":24,"inputField":"startTime","button":"startTime"});</script>
-
<input name="endTime" type="text" class="input" id="endTime" size="18" value="<?php echo $this->vars['endTime'];?>" />
<script type="text/javascript">Calendar.setup({"ifFormat":"%Y-%m-%d %H:%M:00","firstDay":0,"showsTime":true,"showOthers":false,"timeFormat":24,"inputField":"endTime","button":"endTime"});</script></td>
						</tr>
						<tr>
							<td colspan="8">
								列出其他字段：
								
								<label><input type="checkbox" name="appVersionIsDisp" id="appVersionIsDisp" <?php echo $this->vars['appVersionIsDisp'] ? ' checked' : '';?>/> 客户端版本</label>
								&nbsp;
								<label><input type="checkbox" name="ipIsDisp" id="ipIsDisp" <?php echo $this->vars['ipIsDisp'] ? ' checked' : '';?>/> 下单所在IP</label>
								&nbsp;
								<label><input type="checkbox" name="ipProvinceIsDisp" id="ipProvinceIsDisp" <?php echo $this->vars['ipProvinceIsDisp'] ? ' checked' : '';?>/> IP所在省份</label>
								&nbsp;
								<label><input type="checkbox" name="ipCityIsDisp" id="ipCityIsDisp" <?php echo $this->vars['ipCityIsDisp'] ? ' checked' : '';?>/> IP所在城市</label>
								&nbsp;
								<label><input type="checkbox" name="sessionIdIsDisp" id="sessionIdIsDisp" <?php echo $this->vars['sessionIdIsDisp'] ? ' checked' : '';?>/> 会话ID</label>
								&nbsp;
								<label><input type="checkbox" name="udidIsDisp" id="udidIsDisp" <?php echo $this->vars['udidIsDisp'] ? ' checked' : '';?>/> 机器号</label>
								&nbsp;
								<label><input type="checkbox" name="verIsDisp" id="verIsDisp" <?php echo $this->vars['verIsDisp'] ? ' checked' : '';?>/> 通信协议版本</label>
								&nbsp;
								<label><input type="checkbox" name="userAgentIsDisp" id="userAgentIsDisp" <?php echo $this->vars['userAgentIsDisp'] ? ' checked' : '';?>/> User Agent</label>							</td>
						</tr>
						<tr>
							<td colspan="8">
								订单状态：
								<label><input type="radio" name="status" id="status1" value="" <?php echo $this->vars['status'] === '' ? ' checked' : '';?>/> 不限</label>
								<label>&nbsp;<input type="radio" name="status" id="status2" value="1" <?php echo $this->vars['status'] === '1' ? ' checked' : '';?>/> 正常</label>
								<label>&nbsp;<input type="radio" name="status" id="status3" value="2" <?php echo $this->vars['status'] === '2' ? ' checked' : '';?>/> 失败</label>
								<input name="search" type="submit" id="search2" value="查找" class="button" />							</td>
						</tr>
					</table>
				</form>
			</div>

			<div class="cl"></div>
			<div id="content">
				<div style="display:none;">
<?php foreach($this->rows as $key=>$row) {?>
					<div class="colorbox" id="orderItem<?php echo $key;?>" >
						<div class="subject">
							<div class="title">订单“<?php echo $row['orderId']?>”的商品清单</div>
							<div class="close" onClick="$(document).colorbox.close();">&nbsp;</div>
						</div>
						<div>
							<table width="500" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td>&nbsp;商品编号</td>
									<td>商品全名</td>
									<td>商品价格</td>
									<td>购买数量</td>
									<td>颜色</td>
									<td>尺寸</td>
								</tr>
<?php

?>
<?php
	if ($row['itemXmlParseIsError'] == 0) {
?>
<?php
		foreach($row['itemRows'] as $itemRow) {
?>	
								<tr>
									<td>&nbsp;<?php echo $itemRow['code'];?></td>
									<td><?php echo $itemRow['name'];?></td>
									<td>￥<?php echo $itemRow['price'];?></td>
									<td><?php echo $itemRow['quantity'];?></td>
									<td><?php echo isset($itemRow['color']) ? $itemRow['color'] : '&nbsp;';?></td>
									<td><?php echo isset($itemRow['size']) ? $itemRow['size'] : '&nbsp;';?></td>
								</tr>
<?php
		}
?>	
<?php
	} else {
?>
								<tr>
									<td height="25" colspan="6" style="line-height:22px;">数据解析错误：<br/><?php echo htmlspecialchars($row['itemData']);?></td>
								</tr>
<?php
	}
?>
							</table>
						</div>
					</div>
<?php
}
?>
				</div>
				<form id="listForm" name="listForm" method="post" action="">
					<table class="table">
						<tr class="subject">
							<td>订单编号</td>
							<td>订单金额</td>

							<td>省/市/区、县</td>

							<td>下单时间</td>
							<td>提交时间</td>
							<td>商品详情</td>
							<td>操作系统</td>
							<td>推广ID</td>
							<td>推广子ID</td>
							<?php if ($this->vars['appVersionIsDisp']){;?><td>客户端版本</td><?php }?>
							<?php if ($this->vars['ipIsDisp']){;?><td>下单所在IP</td><?php }?>
							<?php if ($this->vars['ipProvinceIsDisp']){;?><td>IP所在省份</td><?php }?>
							<?php if ($this->vars['ipCityIsDisp']){;?><td>IP所在城市</td><?php }?>
							<?php if ($this->vars['sessionIdIsDisp']){;?><td>会话ID</td><?php }?>
							<?php if ($this->vars['udidIsDisp']){;?><td>机器号</td><?php }?>
							<?php if ($this->vars['verIsDisp']){;?><td>通信协议版本</td><?php }?>
							<?php if ($this->vars['userAgentIsDisp']){;?><td>User Agent</td><?php }?>
							<td>设为测试依据</td>
						</tr>
<?php foreach($this->rows as $key=>$row) {?>
						<tr class="dataLine">
							<td><?php echo $row['orderId'] != '' ? $row['orderId'] : '<span title="'. $row['orderMessage'] .'">失败订单</span>';?></td>
							<td class="numberTd">￥<?php echo $row['amount'] * 1;?></td>

							<td><?php echo $row['province'];?>/<?php echo $row['city'];?>/<?php echo $row['county'];?></td>
							<td title="<?php echo $row['orderTime'];?>"><?php echo date("m-d H:i", strtotime($row['orderTime']));?></td>
							<td title="<?php echo $row['addTime'];?>"><?php echo date("m-d H:i", strtotime($row['addTime']));?></td>
							<td><a href="javascript:void(0);" onclick="$(document).ready(function(){$.fn.colorbox({inline:true, href:'#orderItem<?php echo $key;?>'});});">查看</a></td>
							<td><?php echo $row['osName'];?>,<?php echo $row['osVersion'];?></td>
							<td><?php echo $row['sourceId'];?></td>
							<td><?php echo $row['sourceSubId'];?></td>
							<?php if ($this->vars['appVersionIsDisp']){;?><td><?php echo $row['appVersion'];?></td><?php }?>
							<?php if ($this->vars['ipIsDisp']){;?><td><?php echo $row['ip'];?></td><?php }?>
							<?php if ($this->vars['ipProvinceIsDisp']){;?><td><?php echo $row['ipProvince'];?></td><?php }?>
							<?php if ($this->vars['ipCityIsDisp']){;?><td><?php echo $row['ipCity'];?></td><?php }?>
							<?php if ($this->vars['sessionIdIsDisp']){;?><td><?php echo $row['sessionId'];?></td><?php }?>
							<?php if ($this->vars['udidIsDisp']){;?><td><?php echo $row['udid'];?></td><?php }?>
							<?php if ($this->vars['verIsDisp']){;?><td><?php echo $row['ver'];?></td><?php }?>
							<?php if ($this->vars['userAgentIsDisp']){;?><td><?php echo $row['userAgent'];?></td><?php }?>
							<td><?php echo $row['testMessage'];?></td>
						</tr>
<?php
}
?>
					</table>
					<table class="controlTable">
						<tr>
							<td colspan="7" align="right" class="paginator"><?php echo $this->pageString;?></td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</div>
</body>
</html>